package com.ishuoxiao.web.action.letteraction;

import java.util.List;

import com.ishuoxiao.services.lettermgr.ILetterInfoService;
import com.ishuoxiao.tools.DataRuntimeException;

import com.opensymphony.xwork2.ActionSupport;

public class LetterInfoAction extends ActionSupport{

	private ILetterInfoService letterMgrService;
	private List letterInfos;

	public ILetterInfoService getLetterMgrService() {
		return letterMgrService;
	}

	public void setLetterMgrService(ILetterInfoService letterMgrService) {
		this.letterMgrService = letterMgrService;
	}

	
	
	public List getLetterInfos() {
		return letterInfos;
	}

	public void setLetterInfos(List letterInfos) {
		this.letterInfos = letterInfos;
	}
	
	//public String 
	public String newLetterInfo(){
		try{
			letterInfos=letterMgrService.allNewLetterInfo();
			System.out.println(letterInfos.size()+"......");
			return "allnewletterinfo";
		}catch(DataRuntimeException e){
			System.out.println(e.toString());
			return "error";
		}
	}
	

}
